<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改购物车信息')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-commoditycart-edit" th:object="${commodityCart}">
            <input name="cartId" th:field="*{cartId}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label"><span style="color: red; ">*</span>产品id：</label>
                <div class="col-sm-8">
                    <input name="commodityId" th:field="*{commodityId}" class="form-control" type="text" required maxlength="36">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label"><span style="color: red; ">*</span>产品数量：</label>
                <div class="col-sm-8">
                    <input name="commodityCount" th:field="*{commodityCount}" class="form-control" type="text" required maxlength="36">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label"><span style="color: red; ">*</span>加入时价格：</label>
                <div class="col-sm-8">
                    <input name="commodityMoney" th:field="*{commodityMoney}" class="form-control" type="text" required maxlength="36">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label"><span style="color: red; ">*</span>产品信息：</label>
                <div class="col-sm-8">
                    <input name="commodityJson" th:field="*{commodityJson}" class="form-control" type="text" required maxlength="36">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label"><span style="color: red; ">*</span>用户id：</label>
                <div class="col-sm-8">
                    <input name="userId" th:field="*{userId}" class="form-control" type="text" required maxlength="36">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label"><span style="color: red; ">*</span>商户id：</label>
                <div class="col-sm-8">
                    <input name="merchantId" th:field="*{merchantId}" class="form-control" type="text" required maxlength="36">
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script type="text/javascript">
        var prefix = ctx + "bussiness/commoditycart";
        $("#form-commoditycart-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-commoditycart-edit').serialize());
            }
        }
    </script>
</body>
</html>